<template>
  <el-dialog v-model="win.visible">
    <div>我是子组件 {{ win }}</div>
    <el-button @click="fn">改变</el-button>
  </el-dialog>
</template>

<script setup>
const props = defineProps({
  win: {
    type: Object,
    default: () => {
      return {
        title: '',
        visible: false,
      }
    },
  },
})
console.log(props.win)
const fn = () => {
  props.win.title = 'xxxxxxxxxxxxxxxxxx'
}
</script>

<style scoped></style>
